/**
 * 解法一太啰嗦，简化一下
 */
public class Solution2 {
    public int reverseBits(int n) {
        int result = 0;
        for (int i = 1; i <= 32; i++) {
            int bit = n & 0b1;
            result <<= 1;
            result |= bit;
            n >>= 1;
        }
        return result;
    }
}